$(document).ready(function(){
	var password = new Password("#UserCurrentPassword", "#UserNewPassword", "#UserConfirmPassword");
});

function Password(currentStr, newStr, confirmStr){
	this.$currentPassword = $(currentStr);
	this.$curLabel = this.$currentPassword.siblings("label");
	this.$newPassword = $(newStr);
	this.$newLabel = this.$newPassword.siblings("label");
	this.$confirmPassword = $(confirmStr);
	this.$confirmLabel = this.$confirmPassword.siblings("label");
	this.init();
}

Password.prototype = {
	init : function(){
		var _this = this;
		this.$currentPassword.click(function(){
			// check if there is no val in it
			// if so,  hide tip
			var p = $(this).val();
			if(p == ""){
				_this.$curLabel.css("display", "none");
			}
		}).blur(function(){
			var p = $(this).val();
			if(p == ""){
				_this.$curLabel.css("display", "block");
			}
		});
		this.$newPassword.click(function(){
			// check if there is no val in it
			// if so,  hide tip
			var p = $(this).val();
			if(p == ""){
				_this.$newLabel.css("display", "none");
			}
		}).blur(function(){
			var p = $(this).val();
			if(p == ""){
				_this.$newLabel.css("display", "block");
			}
		});
		this.$confirmPassword.click(function(){
			// check if there is no val in it
			// if so,  hide tip
			var p = $(this).val();
			if(p == ""){
				_this.$confirmLabel.css("display", "none");
			}
		}).blur(function(){
			var p = $(this).val();
			if(p == ""){
				_this.$confirmLabel.css("display", "block");
			}
		});
	}
}













